package com.da.springtest.spring5.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @author JokerDa.
 * @date 2021/1/5 10:58
 * Description:
 */
@Component
@Aspect
public class UserServiceProxy {

    @Pointcut("execution(public * com.da.springtest.spring5.aop.UserService.*(..))")
    public void point() {}

    @Before(value = "point()")
    public void before(JoinPoint joinPoint){
        System.out.println("前置通知");
    }
}
